import { useFetch } from '@/hooks/useFetch'
import pkgJson from 'element-plus/package.json'

const version = pkgJson.version

interface ResultFun {
  getThemeChalkStyle: () => Promise<any>
}

export const useThemeFiles = (): ResultFun => {
  const getThemeChalkStyle = async (): Promise<any> => {
    return await useFetch(`//unpkg.com/element-plus@${ version }/lib/theme-chalk/index.css`)
  }

  return { getThemeChalkStyle }
}
